<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <link rel="Shortcut Icon" href="http://htmljs.b0.upaiyun.com//images/logo.ico?123">
    <link href="http://htmljs.b0.upaiyun.com//images/logo.ico?123" rel="shortcut icon" type="image/x-icon">
    <title>寻求ios开发和设计师一起做有意思的事情，求联系微信</title>
    <script src="http://htmljs.b0.upaiyun.com//js/jquery.js"></script>
    <link href="http://htmljs.b0.upaiyun.com//images/icon.png" rel="apple-touch-icon"/>
    <style>

    html,body{
        width:100%;
        height:100%;
        margin:0;
        padding:0;
    }
        .bg{
            width:100%;
            height:100%;
            background: url(./images/bg.png);
            background-size: 100%;
        }
        .moon{
            width:350px;
            height:350px;
            background: url(./images/moon.png);
            position: absolute;
            right:-100px;
            top:20px;
            background-size: 100%;
        }
        .moon-text{
            width:70px;
            height:232px;
            background: url(./images/word.png);
            position: absolute;
            background-repeat: no-repeat;
            right:20px;
            top:70px;
            background-size: 100%;
        }
        .logo{
            width:96px;
            height:86px;
            background: url(./images/logo.png);
            position: absolute;
            background-repeat: no-repeat;
            left:0px;
            top:50px;
            background-size: 100%;
        }
        .editor{
            width:170px;
            height:260px;
            background: url(./images/text-bg.png);
            position: absolute;
            background-repeat: no-repeat;
            left:50px;
            top:150px;
            background-size: 100%;
        }
        .car{
            width:100%;
            height:250px;
            background: url(./images/car.png);
            position: absolute;
            background-repeat: no-repeat;
            left:0;
            bottom:0px;
            background-size: 100%;
        }
        .main-text{
            width:130px;
            padding:20px;
            height:170px;
            font-size: 14px;
            color:#9f7b53;
            background: none;
            border:none;
        }
        .name-text{
            width:150px;
            height:30px;
            padding:0 10px;
            text-align: right;
            font-size: 14px;
            color:#9f7b53;
            background: none;
            border:none;
        }
    </style>
  </head>
  <body id="index">
    <div class="bg"></div>
    <div class="logo"></div>
    <div class="moon"></div>
    <div class="moon-text"></div>
    <div class="editor"><textarea class="main-text"></textarea>
        <input type="text" class="name-text"/></div>
    <div class="car"></div>
    <script>
    function getQueryString(name)
{
    // 如果链接没有参数，或者链接中不存在我们要获取的参数，直接返回空
    if(location.href.indexOf("?")==-1 || location.href.indexOf(name+'=')==-1)
    {
        return '';
    }
 
    // 获取链接中参数部分
    var queryString = location.href.substring(location.href.indexOf("?")+1);
 
    // 分离参数对 ?key=value&key2=value2
    var parameters = queryString.split("&");
 
    var pos, paraName, paraValue;
    for(var i=0; i<parameters.length; i++)
    {
        // 获取等号位置
        pos = parameters[i].indexOf('=');
        if(pos == -1) { continue; }
 
        // 获取name 和 value
        paraName = parameters[i].substring(0, pos);
        paraValue = parameters[i].substring(pos + 1);
 
        // 如果查询的name等于当前name，就返回当前值，同时，将链接中的+号还原成空格
        if(paraName == name)
        {
            return unescape(paraValue.replace(/\+/g, " "));
        }
    }
    return '';
};
        var main_text=getQueryString("main");
        var name_text=getQueryString("name");
        $(".main-text").val(main_text)
        $(".name-text").val(name_text)
        $(".main-text").on("change",function(){
            main_text = this.value;
        })
        $(".name-text").on("change",function(){
            name_text = this.value;
        })
         try{
            document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
                WeixinJSBridge.on('menu:share:timeline', function(argv){
                    WeixinJSBridge.invoke('shareTimeline',{
                        "img_url":"",
                        "img_width":"114",
                        "img_height":"114",
                        "link":window.location.href.replace(/\?.*$/,"")+"?name="+name_text+"&main="+main_text,
                        "desc":"",
                        "title":name_text+" 给你送来的中秋祝福"
                    }, function(res){});
                });
                WeixinJSBridge.on('menu:share:appmessage', function(argv){
                    WeixinJSBridge.invoke('sendAppMessage',{
                        "img_url":"",
                        "img_width":"114",
                        "img_height":"114",
                        "link":window.location.href.replace(/\?.*$/,"")+"?name="+name_text+"&main="+main_text,
                        "desc":"",
                        "title":name_text+" 给你送来的中秋祝福"
                    }, function(res){});
                });
            });
        }catch(e){

        }
    </script>
    <script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F194b0e45c7c9214c485ba8ce9e7e3fa6' type='text/javascript'%3E%3C/script%3E"));
</script>

  </body>
</html>